package com.fa4j.common.base.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

@Data
public class PageQuery {

    public static final Long DEFAULT_CURRENT = 1L;
    public static final Long DEFAULT_SIZE = 10L;

    @Schema(description = "需要查询的字段")
    private List<String> columns;

    @Schema(description = "当前页")
    private Long current = DEFAULT_CURRENT;

    @Schema(description = "每页显示条数")
    private Long size = DEFAULT_SIZE;

    /**
     * 排序字段
     */
    @Schema(description = "排序字段")
    private String orderBy;

    @Schema(description = "排序是否顺序")
    private Boolean orderAsc = Boolean.TRUE;

    @Schema(description = "是否查询总数")
    private Boolean searchCount = Boolean.TRUE;

}
